package com.ym.medical.enums;

import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.util.StdConverter;
import com.ym.common.annotations.EnumDescription;
import com.ym.common.constant.DictEnum;

/**
 * 患者咨询订单状态
 */
@EnumDescription("患者咨询订单状态")
public enum InquiryOrderStateEnum implements DictEnum {

	//--------------------start-----------------

	/**
	 * 待接单
	 */
	WAITING_LIST("01","待接单"),
	/**
	 * 已接单
	 */
	HAVE_ORDER("02","已接单"),
	/**
	 * 完成
	 */
	COMPLETE("03","完成"),
	/**
	 * 取消
	 */
	CANCEL("04","取消"),
	/**
	 * 待生效  Effective
	 */
	WAIT_EFFECTIVE("05","待生效"),

	/**
	 * 被举报后订单状态
	 * 驳回修改
	 */
	REJECT("06","驳回修改"),

	/**
	 * 退症订单，让用户主动退款
	 */
	UNSUBSCRIBE("07","退症订单"),

	/**
	 * 已作废
	 */
	VOIDED("08","已作废"),

	//--------------------end-------------------
	;

	private String key;

	private String value;

	InquiryOrderStateEnum(String key, String value) {
		this.key = key;
		this.value = value;
	}

	@Override
	public String getKey() {
		return this.key;
	}

	@Override
	public String getValue() {
		return this.value;
	}


	/**
	 * 序列化使用
	 */
	public static class Covert extends StdConverter<String, JSONObject> {
		@Override
		public JSONObject convert(String value) {
			return DictEnum.valueOfJson(InquiryOrderStateEnum.class, value);
		}
	}
}
